// 学生模块model定义

package models

import "time"

// 学生信息
type Info struct {
	Id          uint32    `json:"id" orm:"auto;pk"`
	AddTime     time.Time `json:"addTime" orm:"type(datetime);auto_now_add" label:"注册时间"`
	SignupTime  time.Time `json:"signupTime" orm:"type(datetime);auto_now_add" label:"报名时间"`
	FeeTime     time.Time `json:"feeTime" orm:"type(datetime);auto_now_add" label:"交费成功时间"`
	Phone       string    `json:"phone" orm:"size(11)" label:"手机号码"`
	PhoneBackup string    `json:"phoneBackup" orm:"size(11)" label:"备用号码, 家人或朋友的手机号"`
	//Status uint32  `json:"status" label:"状态: 0已注册待报名, 1已报名待审核, 2审核通过待交费, 3审核被拒, 4已交费待核实, 5已核实交费金额待分配, 6已分配"`
	Status   uint32  `json:"status" label:"状态: 0已登录待报名, 1已报名待审核, 2审核通过待交费, 3审核被拒, 5交费成功"`
	Feedback string  `json:"feedback" orm:"size(20)" label:"管理员的审核反馈信息"`
	Fee      float32 `json:"fee" label:"交费金额"`
	Exit     bool    `json:"exit" label:"是否已退学"`

	WeixinId string `json:"weixinId" label:"微信openId"`
	NickName string `json:"nickName" label:"微信昵称"`
	UserLogo string `json:"userLogo" label:"微信头像"`

	City        string `json:"city" orm:"size(10)" label:"市"`
	County      string `json:"county" orm:"size(10)" label:"县"`
	ExamCardNum string `json:"examCardNum" orm:"size(20)" label:"准考证号"`
	Signup      string `json:"signup" orm:"size(20)" label:"报名号"`

	Name       string    `json:"name" orm:"size(10)" label:"姓名"`
	Sex        bool      `json:"sex" orm:"default(true)" label:"性别(男:1, 女:0)"`
	Birthday   time.Time `json:"birthday" orm:"type(datetime);auto_now_add" label:"出生日期"`
	Ethnic     uint32    `json:"ethnic" label:"民族"`
	Speciality string    `json:"speciality" label:"特长"`
	IdCardNum  string    `json:"idCardNum" orm:"size(18)" label:"身份证号码"`
	Address    string    `json:"address" label:"家庭住址"`

	Picture    string `json:"picture" label:"免冠证件照图片"`
	ExamCard   string `json:"examCard" label:"准考证图片"`
	IdCardFace string `json:"idCardFace" label:"身份证正面图片"`
	IdCardBack string `json:"idCardBack" label:"身份证背面图片"`

	Ys  uint32 `json:"ys" label:"语数分数"`
	Lh  uint32 `json:"lh" label:"理化分数"`
	Zc  uint32 `json:"zc" label:"职测分数"`
	Sum uint32 `json:"sum" label:"总分"`

	SchoolNum string `json:"schoolNum" orm:"size(10);default(81100)" label:"学校代码"`
	SpecialId uint32 `json:"specialId" label:"报考专业"`
	IsAdjust  bool   `json:"isAdjust" label:"是否去其它专业"`
	Remark    string `json:"remark" label:"备注"`

	Family      string `json:"family" label:"家庭主要成员和主要社会关系(json)"`
	Lodging     bool   `json:"lodging" orm:"default(true)" label:"是否住校"`
	ClassroomId uint32 `json:"classroomId" label:"分配到的班级"`
	DormitoryId uint32 `json:"dormitoryId" label:"分配到的宿舍"`

	Recommend string `json:"recommend" orm:"size(10)" label:"推荐教师"`
	Type      uint32 `json:"type" label:"报考类别: 1:职教高考, 2:职业中专, 3:职业中专(3+2), 4:技工, 5:技工(3+2)"`
	School    string `json:"school" label:"毕业学校"`
	Post      string `json:"post" orm:"size(10)" label:"任何职务"`
	Postal    string `json:"postal" orm:"size(6)" label:"邮政编码"`
	Hometown  string `json:"hometown" label:"籍贯"`
	Marriage  bool   `json:"marriage" label:"婚否"`
	Culture   uint32 `json:"culture" label:"文化程度"`
	Nicety    string `json:"nicety" label:"何时评为何级三好生或优秀学生干部"`

	Situation uint32 `json:"situation" label:"学生类别: 0应届, 1往届"`
	Citytown  bool   `json:"citytown" label:"是否城镇户口: 1城市户口, 0农业户口"`
	ResidType uint32 `json:"residType" label:"所在居住地，区号"`

	AuditAdmin uint32 `json:"auditAdmin" label:"审核员id"`
}

// 操作记录(在状态更改时予以记录)
type OperateRecord struct {
	Id        uint32    `json:"id" orm:"auto;pk"`
	StudentId uint32    `json:"studentId" label:"学生id"`
	AdminId   uint32    `json:"adminId" label:"管理员id"`
	Status    uint32    `json:"status" label:"状态: 0已注册待报名, 1已报名待审核, 2审核通过待交费, 3审核被拒, 4已交费待核实, 5已核实待分配, 6已分配"`
	Remark    string    `json:"remark" label:"备注"`
	AddTime   time.Time `json:"addTime" orm:"type(datetime);auto_now_add"`
}
